package com.qf.business.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.data.goods.entity.GoodsInfo;
import com.qf.data.goods.vo.output.GoodsFenmianOutput;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * (GoodsInfo)表数据库访问层
 *
 * @author makejava
 * @since 2022-07-06 14:13:37
 */
public interface GoodsInfoMapper extends BaseMapper<GoodsInfo> {

    @Select("select g.*, i.image as image, f.fenlei_name as fenlei  \n" +
            "        from goods_info g \n" +
            "\tjoin goods_image i on g.id = i.gid\n" +
            "\tjoin goods_fenlei f on g.fid = f.id\n" +
            "\twhere i.type = 1")
    List<GoodsFenmianOutput> querySystemList();
}


